package com.example.lancooznbk.model.api;

import com.example.lancooznbk.service.HttpGetServer;
import com.lancoo.rxretrofitlibrary.Api.BaseApi;
import com.lancoo.rxretrofitlibrary.Api.UserInfo;
import com.lancoo.rxretrofitlibrary.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxFragment;

import retrofit2.Retrofit;
import rx.Observable;

/**
 * Created by tangminglong on 17/7/28.
 */

public class ImpAndDifTutorApi extends BaseApi {

    private int pageSize = 10;
    private int pageIndex = 1;

    private int status = -1;

    private String queType = "";

    public ImpAndDifTutorApi(HttpOnNextListener listener, RxFragment rxFragment) {
        super(listener, rxFragment);
    }


    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(int pageIndex) {
        this.pageIndex = pageIndex;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getQueType() {
        return queType;
    }

    public void setQueType(String queType) {
        this.queType = queType;
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpGetServer httpGetServer = retrofit.create(HttpGetServer.class);
        return httpGetServer.getImpAndDifTutorItem1(UserInfo.StuId,UserInfo.StuName,UserInfo.SubjectId, UserInfo.StageNo,
                queType,status,pageIndex,pageSize);
    }
}
